{"ast":null,"code":"import _objectDestructuringEmpty from \"@babel/runtime/helpers/esm/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"style\", \"motion\", \"motionNodes\", \"motionType\", \"onMotionStart\", \"onMotionEnd\", \"active\", \"treeNodeRequiredProps\"];\nimport * as React from 'react';\nimport { useEffect } from 'react';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport TreeNode from './TreeNode';\nimport { getTreeNodeProps } from './utils/treeUtil';\nimport { TreeContext } from './contextTypes';\nvar MotionTreeNode = function MotionTreeNode(_ref, ref) {\n  var className = _ref.className,\n    style = _ref.style,\n    motion = _ref.motion,\n    motionNodes = _ref.motionNodes,\n    motionType = _ref.motionType,\n    onOriginMotionStart = _ref.onMotionStart,\n    onOriginMotionEnd = _ref.onMotionEnd,\n    active = _ref.active,\n    treeNodeRequiredProps = _ref.treeNodeRequiredProps,\n    props = _objectWithoutProperties(_ref, _excluded);\n  var _React$useState = React.useState(true),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    visible = _React$useState2[0],\n    setVisible = _React$useState2[1];\n  var _React$useContext = React.useContext(TreeContext),\n    prefixCls = _React$useContext.prefixCls;\n  var motionedRef = React.useRef(false);\n  var onMotionEnd = function onMotionEnd() {\n    if (!motionedRef.current) {\n      onOriginMotionEnd();\n    }\n    motionedRef.current = true;\n  };\n  useEffect(function () {\n    if (motionNodes && motionType === 'hide' && visible) {\n      setVisible(false);\n    }\n  }, [motionNodes]);\n  useEffect(function () {\n    // Trigger motion only when patched\n    if (motionNodes) {\n      onOriginMotionStart();\n    }\n    return function () {\n      if (motionNodes) {\n        onMotionEnd();\n      }\n    };\n  }, []);\n  if (motionNodes) {\n    return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n      ref: ref,\n      visible: visible\n    }, motion, {\n      motionAppear: motionType === 'show',\n      onAppearEnd: onMotionEnd,\n      onLeaveEnd: onMotionEnd\n    }), function (_ref2, motionRef) {\n      var motionClassName = _ref2.className,\n        motionStyle = _ref2.style;\n      return /*#__PURE__*/React.createElement(\"div\", {\n        ref: motionRef,\n        className: classNames(\"\".concat(prefixCls, \"-treenode-motion\"), motionClassName),\n        style: motionStyle\n      }, motionNodes.map(function (treeNode) {\n        var restProps = _extends({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),\n          title = treeNode.title,\n          key = treeNode.key,\n          isStart = treeNode.isStart,\n          isEnd = treeNode.isEnd;\n        delete restProps.children;\n        var treeNodeProps = getTreeNodeProps(key, treeNodeRequiredProps);\n        return /*#__PURE__*/React.createElement(TreeNode, _extends({}, restProps, treeNodeProps, {\n          title: title,\n          active: active,\n          data: treeNode.data,\n          key: key,\n          isStart: isStart,\n          isEnd: isEnd\n        }));\n      }));\n    });\n  }\n  return /*#__PURE__*/React.createElement(TreeNode, _extends({\n    domRef: ref,\n    className: className,\n    style: style\n  }, props, {\n    active: active\n  }));\n};\nMotionTreeNode.displayName = 'MotionTreeNode';\nvar RefMotionTreeNode = /*#__PURE__*/React.forwardRef(MotionTreeNode);\nexport default RefMotionTreeNode;","map":{"version":3,"names":["_objectDestructuringEmpty","_extends","_slicedToArray","_objectWithoutProperties","_excluded","React","useEffect","classNames","CSSMotion","TreeNode","getTreeNodeProps","TreeContext","MotionTreeNode","_ref","ref","className","style","motion","motionNodes","motionType","onOriginMotionStart","onMotionStart","onOriginMotionEnd","onMotionEnd","active","treeNodeRequiredProps","props","_React$useState","useState","_React$useState2","visible","setVisible","_React$useContext","useContext","prefixCls","motionedRef","useRef","current","createElement","motionAppear","onAppearEnd","onLeaveEnd","_ref2","motionRef","motionClassName","motionStyle","concat","map","treeNode","restProps","data","title","key","isStart","isEnd","children","treeNodeProps","domRef","displayName","RefMotionTreeNode","forwardRef"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-tree/es/MotionTreeNode.js"],"sourcesContent":["import _objectDestructuringEmpty from \"@babel/runtime/helpers/esm/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/esm/objectWithoutProperties\";\nvar _excluded = [\"className\", \"style\", \"motion\", \"motionNodes\", \"motionType\", \"onMotionStart\", \"onMotionEnd\", \"active\", \"treeNodeRequiredProps\"];\nimport * as React from 'react';\nimport { useEffect } from 'react';\nimport classNames from 'classnames';\nimport CSSMotion from 'rc-motion';\nimport TreeNode from './TreeNode';\nimport { getTreeNodeProps } from './utils/treeUtil';\nimport { TreeContext } from './contextTypes';\nvar MotionTreeNode = function MotionTreeNode(_ref, ref) {\n  var className = _ref.className,\n    style = _ref.style,\n    motion = _ref.motion,\n    motionNodes = _ref.motionNodes,\n    motionType = _ref.motionType,\n    onOriginMotionStart = _ref.onMotionStart,\n    onOriginMotionEnd = _ref.onMotionEnd,\n    active = _ref.active,\n    treeNodeRequiredProps = _ref.treeNodeRequiredProps,\n    props = _objectWithoutProperties(_ref, _excluded);\n  var _React$useState = React.useState(true),\n    _React$useState2 = _slicedToArray(_React$useState, 2),\n    visible = _React$useState2[0],\n    setVisible = _React$useState2[1];\n  var _React$useContext = React.useContext(TreeContext),\n    prefixCls = _React$useContext.prefixCls;\n  var motionedRef = React.useRef(false);\n  var onMotionEnd = function onMotionEnd() {\n    if (!motionedRef.current) {\n      onOriginMotionEnd();\n    }\n    motionedRef.current = true;\n  };\n  useEffect(function () {\n    if (motionNodes && motionType === 'hide' && visible) {\n      setVisible(false);\n    }\n  }, [motionNodes]);\n  useEffect(function () {\n    // Trigger motion only when patched\n    if (motionNodes) {\n      onOriginMotionStart();\n    }\n    return function () {\n      if (motionNodes) {\n        onMotionEnd();\n      }\n    };\n  }, []);\n  if (motionNodes) {\n    return /*#__PURE__*/React.createElement(CSSMotion, _extends({\n      ref: ref,\n      visible: visible\n    }, motion, {\n      motionAppear: motionType === 'show',\n      onAppearEnd: onMotionEnd,\n      onLeaveEnd: onMotionEnd\n    }), function (_ref2, motionRef) {\n      var motionClassName = _ref2.className,\n        motionStyle = _ref2.style;\n      return /*#__PURE__*/React.createElement(\"div\", {\n        ref: motionRef,\n        className: classNames(\"\".concat(prefixCls, \"-treenode-motion\"), motionClassName),\n        style: motionStyle\n      }, motionNodes.map(function (treeNode) {\n        var restProps = _extends({}, (_objectDestructuringEmpty(treeNode.data), treeNode.data)),\n          title = treeNode.title,\n          key = treeNode.key,\n          isStart = treeNode.isStart,\n          isEnd = treeNode.isEnd;\n        delete restProps.children;\n        var treeNodeProps = getTreeNodeProps(key, treeNodeRequiredProps);\n        return /*#__PURE__*/React.createElement(TreeNode, _extends({}, restProps, treeNodeProps, {\n          title: title,\n          active: active,\n          data: treeNode.data,\n          key: key,\n          isStart: isStart,\n          isEnd: isEnd\n        }));\n      }));\n    });\n  }\n  return /*#__PURE__*/React.createElement(TreeNode, _extends({\n    domRef: ref,\n    className: className,\n    style: style\n  }, props, {\n    active: active\n  }));\n};\nMotionTreeNode.displayName = 'MotionTreeNode';\nvar RefMotionTreeNode = /*#__PURE__*/React.forwardRef(MotionTreeNode);\nexport default RefMotionTreeNode;"],"mappings":"AAAA,OAAOA,yBAAyB,MAAM,qDAAqD;AAC3F,OAAOC,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,cAAc,MAAM,0CAA0C;AACrE,OAAOC,wBAAwB,MAAM,oDAAoD;AACzF,IAAIC,SAAS,GAAG,CAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,QAAQ,EAAE,uBAAuB,CAAC;AAChJ,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,SAAS,MAAM,WAA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